home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / porttool.zip / TR.MAN < prev    next >
Text File  |  1992-12-03  |  2KB  |  44 lines

  1.  
  2.    NNAAMMEE
  3.       tr - translate characters
  4.  
  5.    SSYYNNOOPPSSIISS
  6.       ttrr [ -cds ] [ _s_t_r_i_n_g_1 [ _s_t_r_i_n_g_2 ] ]
  7.  
  8.    DDEESSCCRRIIPPTTIIOONN
  9.       ttrr copies the standard input to the standard output with
  10.       substitution or deletion of selected characters.  The arguments
  11.       _s_t_r_i_n_g_1 and _s_t_r_i_n_g_2 are considered sets of characters.  Any input
  12.       character found in _s_t_r_i_n_g_1 is converted into the character in the
  13.       corresponding position within _s_t_r_i_n_g_2.  When _s_t_r_i_n_g_2 is short, it
  14.       is padded to the length of _s_t_r_i_n_g_1 by duplicating the last
  15.       character of _s_t_r_i_n_g_2.
  16.  
  17.       In either string the notation:
  18.          _a-_b
  19.       denotes a range of characters from _a to _b in increasing ASCII
  20.       order.  A backslash (\) followed by 1, 2 or 3 octal digits is
  21.       interpreted as the character whose ASCII code is given by those
  22.       digits.  A backslash followed by any other character overrides any
  23.       special meaning for that character.
  24.  
  25.    OOPPTTIIOONNSS
  26.       Any combination of the options may be used:
  27.  
  28.       --cc Complement the set of characters in _s_t_r_i_n_g_1; match only those
  29.          characters nnoott appearing in _s_t_r_i_n_g_1.
  30.  
  31.       --dd Delete all input characters in _s_t_r_i_n_g_1.
  32.  
  33.       --ss Squeeze all strings of repeated output characters that are in
  34.          _s_t_r_i_n_g_2 to single characters.
  35.  
  36.    EEXXAAMMPPLLEE
  37.       The following example creates a list of all the words in _f_i_l_e_1 one
  38.       per line in _f_i_l_e_2, where a word is taken to be a maximal string of
  39.       alphabetic characters.
  40.  
  41.          tr -cs A-Za-z \012 <_f_i_l_e_1 >_f_i_l_e_2
  42.  
  43.    CCooppyyrriigghhtt  ((cc))  11999911    FFrraannkk  EE..  WWhhaalleeyy    AAllll  rriigghhttss  rreesseerrvveedd
  44.